import Vue from 'vue'
import VueRouter from 'vue-router'
import Personal from 'components/personal/personal'
import PersonalDetails from 'components/personal_details/personal_details'
import Authentication from 'components/changetext/authentication'
import PhoneNumber from 'components/changetext/phone_number'
import PhoneValidate from 'components/changetext/phone_validate'
import Officer from 'components/officer/officer'
import News from 'components/officer/news'
import Manuscript from 'components/manuscript/manuscript'
import Payment from 'components/manuscript/payment'
import Login from 'components/sgin/login'
import Register from 'components/sgin/register'
import Forget from 'components/sgin/forget'
import Change from 'components/sgin/change'
Vue.use(VueRouter);

let router = new VueRouter({
    mode: 'history',
  routes:[
    {
      path:"/",
      redirect:"/home",
        meta: {
            keepAlive: true,
            title: '首页'
        }
    },
      {
          path:"/login",
          component:Login,
          meta: {
              keepAlive: false,
              title: '登录'
          }
      },
      {
          path:"/register",
          component:Register,
          meta: {
              keepAlive: false,
              title: '注册'
          }
      },
      {
          path:"/forget",
          component:Forget,
          meta: {
              keepAlive: false,
              title: '忘记密码'
          }
      },
      {
          path:"/change",
          component:Change,
          meta: {
              keepAlive: false,
              title: '修改密码'
          }
      },
      {
          path:"/manuscript",
          component:Manuscript,
          meta: {
              keepAlive: false,
              title: '我的稿件'
          }
      },
      {
          path:"/payment",
          component:Payment,
          meta: {
              keepAlive: false,
              title: '支付方式'
          }
      },
      {
          path:"/personal_details",
          component:PersonalDetails,
          meta: {
              keepAlive: false,
              title: "个人资料"
          }
      },
      {
          path:"/authentication",
          component:Authentication,
          meta: {
              keepAlive: false,
              title: "身份认证"
          }
      },
      {
          path:"/phone_number",
          component:PhoneNumber,
          meta: {
              keepAlive: false,
              title: "绑定手机号码"
          }
      },
      {
          path:"/phone_validate",
          component:PhoneValidate,
          meta: {
              keepAlive: false,
              title: "手机号码验证"
          }
      },
      {
          path:"/officer",
          component:Officer,
          meta: {
              keepAlive: false,
              title: '会议详情'
          }
      },
      {
          path:"/news",
          name:"news",
          component:News,
          meta: {
              keepAlive: false,
              title: '新闻详情'
          }
      },
      {
          path:"/committee",  //会议组委会
          name:"committee",
          component:()=>import('@/components/officer/committee'),
          // component:Committee,
          meta: {
              keepAlive: false,
              title: '会议组委会'
          }
      },
      {
          path:"/registerf",  //注册费
          name:"registerf",
          component:()=>import('@/components/officer/registerf'),
          meta: {
              keepAlive: false,
              title: '注册费'
          }
      },
      {
          path:"/order",  //订单确定
          name:"order",
          component:()=>import('@/components/officer/order'),
          meta: {
              keepAlive: false,
              title: '订单确定'
          }
      },
      {
          path:"/pay",  //支付方式
          name:"pay",
          component:()=>import('@/components/officer/pay'),
          meta: {
              keepAlive: false,
              title: '支付方式'
          }
      },
    {
      path:"/home",
        component:()=> import('@/components/meetingcenter'),
        meta: {
            keepAlive: true,
            title: '首页'
        },
        children:[
            {
                path:'search',
                component:()=> import('@/components/search'),
                meta: {
                    keepAlive: false,
                    title: '搜索'
                }
            },
        ]
    },{
      path:"/personal",
      component:Personal,
          meta: {
              keepAlive: true,
              title: '个人中心'
          }
    },
      {
          path:"/aca",
          name:'aca',
          component:()=>import ('@/components/AcademicHeadlines'),
          meta: {
              keepAlive: false,
              title: '学术头条'
          }
      },
      {
          path:"/article/:id",
          name: 'article',
          component:()=>import ('@/components/article'),
      },
      {
          path:"/message",  //咨询留言
          name:"message",
          component:()=>import('@/components/personal/message'),
          meta: {
              keepAlive: false,
              title: '咨询留言'
          }
      },
      {
          path:"/online",  //在线咨询
          name:"online",
          component:()=>import('@/components/personal/online'),
          meta: {
              keepAlive: false,
              title: '在线咨询'
          }
      }
  ]
});

export default router


